home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #9
/
Amiga Plus CD - 2004 - No. 09.iso
/
amigaplus
/
tools
/
dev_libs
/
feelin040718
/
sources
/
dataspace
/
object.c
< prev
next >
Wrap
C/C++ Source or Header
|
2004-08-03
|
756b
|
40 lines
#include "Private.h"
///DS_New
F_METHODM(APTR,DS_New,TagItem)
{
struct LocalObjectData *LOD = F_LOD(Class,Obj);
LOD -> Pool = (APTR)(F_DynamicGTD(F_IDA(FA_Dataspace_Pool),NULL,Msg));
if (!LOD -> Pool)
{
if (LOD -> Pool = F_CreatePool(MEMF_CLEAR,1024,4))
{
F_NamePool(LOD -> Pool,"Dataspace / Chunks");
LOD -> Flags |= FF_Dataspace_Allocated;
}
}
if (!LOD -> Pool)
{
F_Log(FV_ERLV_USER,"Unable to Create/Access Pool");
return NULL;
}
return Obj;
}
//+
///DS_Dispose
F_METHOD(void,DS_Dispose)
{
struct LocalObjectData *LOD = F_LOD(Class,Obj);
if (LOD -> Pool && FF_Dataspace_Allocated & LOD -> Flags)
{
F_DeletePool(LOD -> Pool); LOD -> Pool = NULL;
}
}
//+